package com.sz.youban.dt.entity.allinpay;

import java.net.URISyntaxException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by liyang on 2017/6/13.
 */
public class AllinpayProperty 
{
	private static final Logger LOGGER = LoggerFactory.getLogger(AllinpayProperty.class);
	private static String  rootPath;

	static
	{
		try 
		{
			rootPath = AllinpayProperty.class.getResource("/").toURI().getPath();
		} 
		catch (URISyntaxException e) 
		{
			LOGGER.error("=========ex:{}",e);
		}
	}
//    public final static String
    //--------------------
    /**
     * 交易代码。100011是实时单笔代收，100014是实时单笔代付
     */
    public final static String TRX_CODE_RECEIVE = "100011";
    public final static String TRX_CODE_PAY = "100014";

    /**
     * 通联地址
     */
    public final static String TRANURL_TEST_PAY = "https://113.108.182.3/aipg/ProcessServlet"; //通联测试环境，外网（商户测试使用）
    public final static String TRANURL_PROD_PAY = "https://tlt.allinpay.com/aipg/ProcessServlet";//通联生产环境（支付，生产）
    public final static String TRANURL_TEST_VERIFY = "http://w.allinpaysz.com/CRM/validategateway_validateIdentity.action";//通联生产环境（验卡，测试）
    public final static String TRANURL_PROD_VERIFY = "http://w.allinpaysz.com/CRM/validategateway_validateIdentity.action";//通联生产环境（验卡，生产）

    /**
     * busicode 业务代码（测试的时候可以任意使用）
     */
    public final static String BUSICODE_TEST= "19900";
    /**
     * busicode 业务代码（测试的时候可以任意使用）
     */
    public final static String BUSICODE_PROD_PAY= "09900";
    public final static String BUSICODE_PROD_RECEIVE= "19900";

    //-------------------支付(商户信息-测试)--------------------------------- 
    //公钥证书
    public final static String CERPATH_TEST = rootPath+"tonglian/20060400000044502.cer";
    //商户号
    public final static String MERCHANTID_TEST = "200604000000445";
    //用户名
    public final static String USERNAME_TEST = "20060400000044502";
    //密码
    public final static String PASSWORD_TEST = "`12qwe";
    //私钥密码
    public final static String PFXPASSWORD_TEST = "111111";
    //私钥证书
    public final static String PFXPATH_TEST = rootPath+"tonglian/20060400000044502_1.p12";
    //公钥证书
    public final static String TLTCERPATH_TEST= rootPath+"tonglian/allinpay-pds-test.cer";
    
    //-------------------支付(商户信息-正式-代付)--------------------------------- 
    //公钥证书
    public final static String CERPATH_PROD_PAY = rootPath+"tonglian/allinpay-pds.cer";
    //商户号
    public final static String MERCHANTID_PROD_PAY = "200584000014168";
    //用户名
    public final static String USERNAME_PROD_PAY = "20058400001416804";
    //密码
    public final static String PASSWORD_PROD_PAY = "111111";
    //私钥密码
    public final static String PFXPASSWORD_PROD_PAY = "111111";
    //私钥证书
    public final static String PFXPATH_PROD_PAY = rootPath+"tonglian/20058400001416804.p12";
    //公钥证书
    public final static String TLTCERPATH_PROD_PAY= rootPath+"tonglian/allinpay-pds.cer";
    
    //-------------------支付(商户信息-正式-代收)----【先用中融的后续可能要换掉】----------------------------- 
    //证书
    public final static String CERPATH_PROD_RECEIVE = rootPath+"tonglian/allinpay-pds.cer";
    //商户号
    public final static String MERCHANTID_PROD_RECEIVE = "200584000014168";
    //用户名
    public final static String USERNAME_PROD_RECEIVE = "20058400001416804";
    //密码
    public final static String PASSWORD_PROD_RECEIVE = "111111";
    //私钥密码
    public final static String PFXPASSWORD_PROD_RECEIVE = "111111";
    //私钥证书
    public final static String PFXPATH_PROD_RECEIVE = rootPath+"tonglian/20058400001416804.p12";
    //公钥证书
    public final static String TLTCERPATH_PROD_RECEIVE = rootPath+"tonglian/allinpay-pds.cer";
    


    //----------实名认证----------
    //商户
    public final static String MERCHANTNO_TEST = "600027";	//仅用于实名认证的，开发
    public final static String MERCHANTNO_PROD = "600041";	//仅用于实名认证的，生产
    //秘钥
    public final static String DEALKEY_TEST = "75578ada7b404b61abb4b69efb12b1fd";
    public final static String DEALKEY_PROD = "a8b698cf18de441793fedc7ef7d3f058";


    /**
     * XML交易参数
     */
//    public   String acctName = "张国光";
//    public   String acctNo = "6225882516636351";
//    public   String amount = "100000";//交易金额
//    public   String bankcode = "0105";//银行代码

//    public   String cerPath= "config\\20060400000044502.cer";
    //商户号
//    public   String merchantId = "200604000000445";
    //商户密码
//    public   String password = "`12qwe";
    //商户证书信息
//    public   String pfxPassword = "111111";
//    public   String pfxPath= "config\\20060400000044502.p12";
    //ceshi
	/*public   String cerPath= "config\\20080100000000104.cer";
	public   String merchantId = "200801000000001";


	//商户号：200604000000445
	public   String password = "111111";
	//商户证书信息
	public   String pfxPassword = "111111";
	public   String pfxPath= "config\\20080100000000104.p12";*/

//    public   String sum = "200000";//交易总金额
//    public   String tel = "13434343434";

//    public   String userName = "20060400000044502";
    public static void main(String[] args) {
		System.out.println(PFXPATH_PROD_RECEIVE);
	}
}
